﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Collections.ObjectModel;
using System.Security;

namespace Passwords.Services
{
    public interface IDataContext
    {
        Models.CategoryContract FindCategory(string p);

        void AddCategory(Models.CategoryContract category);

        void AddPassword(Models.PasswordContract password);

        Models.PasswordContract FindPassword(Guid guid);

        void SavePassword(Models.PasswordContract src, string origName);

        void SaveCategory(Models.CategoryContract src, string originalName);

        ObservableCollection<Models.PasswordContract> Passwords { get; }

        ObservableCollection<Models.CategoryContract> Categories { get; }

        byte[] GetPasswordHash();

        void DeletePassword(Models.PasswordContract password);
        void DeleteCategory(Models.CategoryContract category);

        SecureString GetSyncPassword(Guid deviceId, byte[] checksum);

        SyncContext SyncContext { get; set; }


        void UpdateProgress();

        Models.SyncTable GetSyncTable(Guid deviceId);

        void SaveSyncTable(Models.SyncTable syncTable);

    }


}
